<template>
  <view class="card-wrapper">
    <view class="card">
      <view class="item ss-flex">
        <view class="top">
          <view class="img-wrapper">
            <image
              class="img"
              :src="sheep.$url.static('/assets/addons/shopro/uniapp/order/cargo.png')"
            ></image>
            <view class="tag">市场</view>
          </view>

          <view class="content ss-flex ss-row-between">
            <view class="left">
              <view class="title">nono 申猴</view>
              <view class="code">
                <view class="label">编号</view>
                <view class="num">23423/345234</view>
              </view>
            </view>
            <view class="right ss-flex-col ss-col-center ss-row-center">
              <view class="pay danger-color">待支付</view>
            </view>
          </view>
        </view>
        <view class="bottom">
          <view class="bottom-item">
            <view class="label">成交价</view>
            <view class="value">￥345.00</view>
          </view>
          <view class="bottom-item">
            <view class="label">订单时间</view>
            <view class="value">￥345.00</view>
          </view>
          <view class="bottom-item">
            <view class="label">订单编号</view>
            <view class="value">23423423
              <image class="copy" src="/static/copy.png" @tap="onCopy" />
            </view>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script setup>

  import sheep from '@/sheep';

  const onCopy = () => {
    sheep.$helper.copyText('复制内容');
  };
</script>


<style scoped lang="scss">
  .copy {
    width: 21rpx;
    height: 21rpx;
    margin-left: 10rpx;
  }

  .item-title {
    font-size: 32rpx;
    color: #EEEEEE;
    padding-top: 30rpx;
  }

  .card-wrapper {
    padding: 0 30rpx;
    margin-bottom: 22rpx;

    .card {
      background-color: #1e1e1e;
      border-radius: 20rpx;
    }
  }

  .pay {
    font-size: 32rpx;
  }

  .item {
    color: #fff;
    display: flex;
    flex-direction: column;

    .top {
      width: calc(100% - 60rpx);
      display: flex;
      padding: 30rpx;
    }

    .img-wrapper {
      position: relative;

      .img {
        border-radius: 20rpx;
        width: 150rpx;
        height: 150rpx;
      }

      .tag {
        position: absolute;
        left: 10rpx;
        top: 10rpx;
        font-size: 20rpx;
        padding: 5rpx 10rpx;
        background: linear-gradient(90deg, #477DFE, #7AB4FF);
        border-radius: 10rpx;
        text-align: center;
        color: #FFFFFF;
      }
    }

    .content {
      flex: 1;
      height: 150rpx;
      margin-left: 30rpx;

      .title {
        font-size: 32rpx;
        color: #E4E4E4;
        margin-bottom: 10rpx;
      }

      .left {
        height: 100%;
        display: flex;
        flex-direction: column;

        .time {
          font-size: 22rpx;
          color: #868686;
        }
      }

      .code {
        font-size: 20rpx;
        display: flex;
        background: #393939;
        border-radius: 4rpx;
        text-align: center;
        line-height: 36rpx;

        .label {
          width: 60rpx;
          height: 36rpx;
          background: linear-gradient(90deg, #45C9F0, #36F6AF);
          border-radius: 4rpx 0rpx 0rpx 4rpx;
          text-align: center;
          color: #000;
        }

        .num {
          padding: 0 10rpx;
        }
      }

      .price {
        font-size: 32rpx;
        color: #00A1FF;
      }

      .right {
        height: 100%;
        font-size: 22rpx;
        color: #EEEEEE;
        display: flex;
        flex-direction: column;
        justify-content: space-between;

        .logo {
          width: 52rpx;
          height: 52rpx;
          margin-bottom: 20rpx;
        }
      }
    }

    .bottom {
      width: calc(100% - 60rpx);
      border-top: 2rpx solid #353535;
      padding: 20rpx 30rpx;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      align-items: center;
      color: #868686;
      font-size: 24rpx;

      .bottom-item {
        width: 100%;
        display: flex;
        justify-content: space-between;
        padding-bottom: 30rpx;

        &:last-child {
          padding-bottom: 0;
        }
      }

      .label {
        color: #868686;
      }

      .value {
        color: #EEEEEE;
      }
    }
  }

  .primary-color {
    color: #00A1FF;
  }

  .warning-color {
    color: #F17126;
  }

  .danger-color {
    color: #FF0000;
  }

  .success-color {
    color: #13C093;
  }
</style>
